home *** CD-ROM | disk | FTP | other *** search
- /********************************************
- ; File: Shell.h
- ;
- ;
- ; Copyright Apple Computer, Inc.1986-92
- ; All Rights Reserved
- ;
- ********************************************/
- #ifndef __TYPES__
- #include <TYPES.h>
- #endif
-
- #ifndef __GSOS__
- #include <gsos.h>
- #endif
-
- #ifndef __SHELL__
- #define __SHELL__
-
- /* GET/SET_LINE_INFO parameter block for class 0 calls */
- typedef struct {
- char *sfile; /* address of source file name */
- char *dfile; /* address of output file name */
- char *parms; /* address of paramter list */
- char *istring; /* address of language specific input string */
- char merr; /* max error level allowed */
- char merrf; /* max error level found */
- char lops; /* operations flag */
- char kflag; /* KEEP flag */
- unsigned long mflags; /* set of letters selected with '-' */
- unsigned long pflags; /* set of letters selected with '+' */
- unsigned long org; /* abs start address of non-relloc load file */
- } GetLInfoPB;
-
- /* GetLInfo/SetLInfo parameter block for level 1 calls */
- typedef struct {
- int pCount; /* parameter count */
- char *sfile; /* address of source file name */
- char *dfile; /* address of output file name */
- char *parms; /* address of paramter list */
- char *istring; /* address of language specific input string */
- char merr; /* max error level allowed */
- char merrf; /* max error level found */
- char lops; /* operations flag */
- char kflag; /* KEEP flag */
- struct { /* bit fields */
- unsigned filler:6; unsigned z:1; unsigned y:1;
- unsigned x:1; unsigned w:1; unsigned v:1;
- unsigned u:1; unsigned t:1; unsigned s:1;
- unsigned r:1; unsigned q:1; unsigned p:1;
- unsigned o:1; unsigned n:1; unsigned m:1;
- unsigned l:1; unsigned k:1; unsigned j:1;
- unsigned i:1; unsigned h:1; unsigned g:1;
- unsigned f:1; unsigned e:1; unsigned d:1;
- unsigned c:1; unsigned b:1; unsigned a:1;
- }mflags; /* set of letters selected with '-' */
- struct {
- unsigned filler:6; unsigned z:1; unsigned y:1;
- unsigned x:1; unsigned w:1; unsigned v:1;
- unsigned u:1; unsigned t:1; unsigned s:1;
- unsigned r:1; unsigned q:1; unsigned p:1;
- unsigned o:1; unsigned n:1; unsigned m:1;
- unsigned l:1; unsigned k:1; unsigned j:1;
- unsigned i:1; unsigned h:1; unsigned g:1;
- unsigned f:1; unsigned e:1; unsigned d:1;
- unsigned c:1; unsigned b:1; unsigned a:1;
- } pflags; /* set of letters selected with '+' */
- unsigned long org; /* abs start address of non-relloc load file */
- } GetLInfoGSPB;
-
- /* FastFile call parameter block for level 0 calls */
- typedef struct {
- int action; /* action parameter */
- int index; /* index parameter */
- int flags; /* flags parameter */
- char **file_handle; /* handle to contents of file */
- unsigned long file_length; /* length of file in memory */
- char *name; /* name of file */
- int access; /* access attribute */
- int file_type; /* file type of file */
- long aux_type; /* aux type of file */
- int storage_type; /* storage type of file */
- int create_date; /* creation date of file */
- int create_time; /* creation time of file */
- int mod_date; /* modification date of file */
- int mod_time; /* modification time of file */
- unsigned long blocks_used; /* blocks of disk space used by file */
- } FastFilePB;
-
- /* FastFile call parameter block for level 1 calls */
- typedef struct {
- int pCount; /* parameter count */
- int action; /* action parameter */
- int index; /* index parameter */
- int flags; /* flags parameter */
- char **fileHandle; /* handle to contents of file */
- union {
- ResultBuf255 *out; /* name returned by indexed_load function */
- GSString255 *in; /* name supplied to FastFile call */
- } pathName;
- int access; /* access attribute */
- int fileType; /* file type of file */
- long auxType; /* aux type of file */
- int storageType; /* storage type of file */
- TimeRec createDate; /* creation date and time */
- TimeRec modDate; /* modification date and time */
- ResultBuf255Ptr option; /* option list */
- unsigned long fileLength; /* length of file in memory */
- unsigned long blocksUsed; /* blocks of disk space used by file */
- } FastFileGSPB;
-
- /* parameter block for GetIODevices and SetIODevices calls */
- typedef struct {
- int output_type;
- ProcPtr output_addr;
- int error_type;
- ProcPtr error_addr;
- int input_type;
- ProcPtr input_addr;
- } IODevPB;
-
- typedef struct {
- int pCount;
- int outputType;
- ProcPtr outputAddr;
- int errorType;
- ProcPtr errorAddr;
- int inputType;
- ProcPtr inputAddr;
- } IODevGSPB, *IODevGSPBPtr;
-
- /* GetCommand call parameter block */
- typedef struct {
- int index;
- int restart;
- int __reserved__;
- int command;
- char name[16];
- } GetCommandPB;
-
- typedef struct {
- int pCount;
- int index;
- int restart;
- int __reserved__;
- int command;
- char name[16];
- } GetCommandGSPB, *GetCommandGSPBPtr;
-
- /* ChangeVector call parameter block */
- typedef struct {
- int __reserved__;
- int vector;
- ProcPtr procPtr;
- ProcPtr oldProcPtr;
- } ChangeVectorPB;
-
- typedef struct {
- int pCount;
- int __reserved__;
- int vector;
- ProcPtr procPtr;
- ProcPtr oldProcPtr;
- } ChangeVectorGSPB;
-
- /* parameter block for level 1 NextWildcard call */
- typedef struct {
- Word pCount;
- ResultBuf255 *pathName;
- Word access;
- Word fileType;
- Longint auxType;
- Word storageType;
- TimeRec createDate;
- TimeRec modDate;
- ResultBuf255Ptr optionList;
- LongWord eof;
- LongWord blocksUsed;
- LongWord resourceEOF;
- LongWord resourceBlocks;
- } NextWildcardGSPB;
-
- /* APW 1.x functions */
-
- extern void CHANGE_VECTOR();
- #define CONSOLE_OUT WRITE_CONSOLE
- extern void DIRECTION();
- extern void ERROR();
- extern void EXECUTE();
- extern void EXPAND_DEVICES();
- extern void EXPORT();
- extern void FASTFILE();
- extern void GET_COMMAND();
- extern void GET_IO_DEVICES();
- extern unsigned int GET_LANG();
- extern void GET_LINFO();
- extern void GET_VAR();
- extern void INIT_WILDCARD();
- extern char *NEXT_WILDCARD();
- #define POP_VARIABLES() asm { \
- jsl 0xe100a8 \
- dcw 0x0117 \
- dcl 0 \
- }
- #define PUSH_VARIABLES() asm { \
- jsl 0xe100a8 \
- dcw 0x0118 \
- dcl 0 \
- sta >_toolErr \
- }
- extern void READ_INDEXED();
- #define READ_VARIABLE GET_VAR
- extern void REDIRECT();
- extern void SET_IO_DEVICES();
- extern void SET_LANG();
- extern void SET_LINFO();
- extern void SET_STOP_FLAG();
- extern void SET_VAR();
- extern int STOP();
- extern void UNSET_VARIABLE();
- extern unsigned long VERSION();
- extern void WRITE_CONSOLE();
-
- /* New ORCA 2.0 level 1 calls
- (or alternate names for existing calls) */
-
- extern void ChangeVectorGS();
- #define ConsoleOutGS WriteConsoleGS
- extern int DirectionGS();
- extern void ErrorGS();
- extern void ExecuteGS();
- extern char *ExpandDevicesGS();
- extern void ExportGS();
- extern void FastFileGS();
- extern GetCommandPB *GetCommandGS();
- extern IODevGSPB *GetIODevicesGS();
- extern unsigned GetLangGS();
- extern GetLInfoPB *GetLInfoGS();
- extern char *GetVarGS();
- extern void InitWildcardGS();
- extern char *NextWildcardGS();
- extern void PopVariablesGS();
- extern void PushVariablesGS();
- extern void ReadIndexedGS();
- #define ReadVariableGS GetVarGS
- extern void RedirectGS();
- extern void SetIODevicesGS();
- extern void SetLangGS();
- extern void SetLInfoGS();
- extern void SetStopFlagGS();
- extern void SetVarGS();
- extern int StopGS();
- extern void UnsetVariableGS();
- extern unsigned long VersionGS();
- extern void WriteConsoleGS();
-
- #endif
-